<!-- 
 * Tournament bracket system for use in scenarios 
 * like sports, computer gaming or other games.
 * 
 * @link http://www.toggymedy.com
 * @license  GNU/GPL, ( http://www.gnu.org/licenses/gpl.txt )
 * @authors Team Excellence

 * The tournament bracket is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * Last update: 2009-11-27
 -->

<form name='velgturn' method='post' action='<?php echo "$_SERVER[PHP_SELF]" ?>?side=viskamper'>
	<table>
		<tr>
			<td><SELECT name='turnid'>
					<?php 
						// Printer ut turneringer i rullegardinliste
						$turnquery = "SELECT * FROM turnering ORDER BY turnid ASC";
						$turnresult = mysql_query($turnquery);
						while($t = mysql_fetch_array($turnresult))
						{
							// gjøre det enklere å hente variablene
							$turnid = $t['turnid'];
							$spill = $t['spill'];
							$format = $t['format'];
							// Skrive ut selve turneringen
		
							echo "<OPTION value='$turnid'>$turnid, $spill, $format</OPTION>";
						} 
					?>

			</SELECT></td>
			<td><input type='submit' name='submit' value='Vis bracket'></td>
		</tr>
	</table>
</form>
